/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.cellstore.negocio;

import java.util.List;
import org.cellstore.dao.TbDominioDao;
import org.cellstore.entidad.TbDominio;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @author PPATOCHE
 */
@Service
public class MantenimientoTablasImp implements MantenimientoTablas {

    @Autowired
    private TbDominioDao tbDominioDao;
    static org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(MantenimientoTablasImp.class);

    @Override
    public void crearTbDominio(TbDominio tbDominio) throws RuntimeException {
        tbDominioDao.crear(tbDominio);
    }

    @Override
    public void editarTbDominio(TbDominio tbDominio) throws RuntimeException {
        tbDominioDao.editar(tbDominio);
    }

    @Override
    public void removerTbDominio(TbDominio tbDominio) throws RuntimeException {
        tbDominioDao.remover(tbDominio);
    }

    @Override
    public TbDominio obtenerTbDominio(Object id) {
        return tbDominioDao.obtener(id);
    }

    @Override
    public List<TbDominio> obtenerTodosTbDominio() {
        return tbDominioDao.obtenerTodos();
    }

    @Override
    public int contadorTbDominio() {
        return tbDominioDao.contador();
    }

    @Override
    public List<TbDominio> obtenerTbDominio(String nombreCampo, String valor) {
        return tbDominioDao.obtener(nombreCampo, valor);
    }
}
